# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.DataCatalog.V1.Model.GoogleCloudDatacatalogV1DataSource do
  @moduledoc """
  Physical location of an entry.

  ## Attributes

  *   `resource` (*type:* `String.t`, *default:* `nil`) - Full name of a resource as defined by the service. For example: `//bigquery.googleapis.com/projects/{PROJECT_ID}/locations/{LOCATION}/datasets/{DATASET_ID}/tables/{TABLE_ID}`
  *   `service` (*type:* `String.t`, *default:* `nil`) - Service that physically stores the data.
  *   `sourceEntry` (*type:* `String.t`, *default:* `nil`) - Output only. Data Catalog entry name, if applicable.
  *   `storageProperties` (*type:* `GoogleApi.DataCatalog.V1.Model.GoogleCloudDatacatalogV1StorageProperties.t`, *default:* `nil`) - Detailed properties of the underlying storage.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :resource => String.t() | nil,
          :service => String.t() | nil,
          :sourceEntry => String.t() | nil,
          :storageProperties =>
            GoogleApi.DataCatalog.V1.Model.GoogleCloudDatacatalogV1StorageProperties.t() | nil
        }

  field(:resource)
  field(:service)
  field(:sourceEntry)

  field(:storageProperties,
    as: GoogleApi.DataCatalog.V1.Model.GoogleCloudDatacatalogV1StorageProperties
  )
end

defimpl Poison.Decoder, for: GoogleApi.DataCatalog.V1.Model.GoogleCloudDatacatalogV1DataSource do
  def decode(value, options) do
    GoogleApi.DataCatalog.V1.Model.GoogleCloudDatacatalogV1DataSource.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.DataCatalog.V1.Model.GoogleCloudDatacatalogV1DataSource do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
